/**
 * Created by BigBi on 2017/4/10.
 */
var fs = require("fs");
var zlib = require('zlib');

// 解压 input.txt.gz 文件为 _input.txt
fs.createReadStream('input.txt.gz')
    .pipe(zlib.createGunzip(),function(err){
        console.log('出错：',err);
    })
    .pipe(fs.createWriteStream('_input.txt'));

console.log("文件解压完成。");